<template>
  <div>
    <h3>账号列表</h3>

    <div id="actList">
      <template>
        <el-table
          ref="multipleTable"
          :data="tableData"
          tooltip-effect="dark"
          style="width: 100%"
         
        >
          <el-table-column type="selection" width="100"> </el-table-column>

          <el-table-column label="日期" width="250">
            <template slot-scope="scope">{{ scope.row.date }}</template>
          </el-table-column>

          <el-table-column prop="name" label="姓名" width="250">
          </el-table-column>

          <el-table-column prop="address" label="地址" width="300">
          </el-table-column>

          <el-table-column label="操作" show-overflow-tooltip>
            <el-button type="primary" size="mini" plain>编辑</el-button>
            <el-button type="danger" size="mini" plain>删除</el-button>
          </el-table-column>
        </el-table>
        <!--  -->
        <div style="margin-top: 20px">
          <!-- 翻页 -->
          <div style="margin-bottom: 20px">
            <el-pagination
              
              :page-sizes="[100, 200, 300, 400]"
              :page-size="100"
              layout="total, sizes, prev, pager, next, jumper"
              :total="400"
            >
            </el-pagination>
          </div>
          <!--  -->
          <el-button @click="toggleSelection()">批量删除</el-button>
          <el-button @click="toggleSelection()">取消选择</el-button>
        </div>
        <!--  -->
      </template>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: [
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
      ],
    };
  },
  methods: {
    toggleSelection(rows) {
      if (rows) {
        rows.forEach((row) => {
          this.$refs.multipleTable.toggleRowSelection(row);
        });
      } else {
        this.$refs.multipleTable.clearSelection();
      }
    },
  },
};
</script>

<style lang="less" scoped>
h3 {
  height: 50px;
}
</style>